<?php
/**
 * Created by PhpStorm.
 * User: xiangpeng
 * Date: 2016/12/25
 * Time: 21:10
 */

namespace Common\Model;


use Think\Model;

class TypeModel extends BaseModel
{
    //验证
    //主键
    protected $pk='tid';
    //要操作那张表
    protected $tableName='type';
    //自动验证
    protected $_validate =[
        ['tyname','require','商品类型名称不能为空',1,3],
        ['tyname','','该商品类型名称已存在',0,'unique',1,3],

    ];
}